package com.example.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.example.enums.menu.MenuStatus;
import com.example.enums.menu.MenuVisible;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "sys_menu")
public class Menu implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "menu_name")
    private String menuName;

    @TableField(value = "path")
    private String path;

    @TableField(value = "component")
    private String component;

    @TableField(value = "visible")
    private MenuVisible visible;

    @TableField(value = "status")
    private MenuStatus status;

    @TableField(value = "perms")
    private String perms;

    @TableField(value = "icon")
    private String icon;

    @TableField(value = "create_by")
    private Long createBy;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_by")
    private Long updateBy;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableLogic
    @TableField(value = "del_flag")
    private Integer delFlag;

    @TableField(value = "remark")
    private String remark;

}
